Integrand size = 28, antiderivative size = 137 \[ \int \frac {(3+3 \sin (e+f x))^3}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {216 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{\sqrt {c} f}-\frac {54 c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac {36 c \cos ^3(e+f x)}{f (c-c \sin (e+f x))^{3/2}}-\frac {216 \cos (e+f x)}{f \sqrt {c-c \sin (e+f x)}} \]
[Out]
Time = 0.23 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.10, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2815, 2758, 2728, 212} \[ \int \frac {(3+3 \sin (e+f x))^3}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {8 \sqrt {2} a^3 \text {arctanh}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{\sqrt {c} f}-\frac {2 a^3 c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac {4 a^3 c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac {8 a^3 \cos (e+f x)}{f \sqrt {c-c \sin (e+f x)}} \]
[In]
[Out]
Rule 212
Rule 2728
Rule 2758
Rule 2815
Rubi steps \begin{align*} \text {integral}& = \left (a^3 c^3\right ) \int \frac {\cos ^6(e+f x)}{(c-c \sin (e+f x))^{7/2}} \, dx \\ & = -\frac {2 a^3 c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}+\left (2 a^3 c^2\right ) \int \frac {\cos ^4(e+f x)}{(c-c \sin (e+f x))^{5/2}} \, dx \\ & = -\frac {2 a^3 c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac {4 a^3 c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}+\left (4 a^3 c\right ) \int \frac {\cos ^2(e+f x)}{(c-c \sin (e+f x))^{3/2}} \, dx \\ & = -\frac {2 a^3 c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac {4 a^3 c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac {8 a^3 \cos (e+f x)}{f \sqrt {c-c \sin (e+f x)}}+\left (8 a^3\right ) \int \frac {1}{\sqrt {c-c \sin (e+f x)}} \, dx \\ & = -\frac {2 a^3 c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac {4 a^3 c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac {8 a^3 \cos (e+f x)}{f \sqrt {c-c \sin (e+f x)}}-\frac {\left (16 a^3\right ) \text {Subst}\left (\int \frac {1}{2 c-x^2} \, dx,x,-\frac {c \cos (e+f x)}{\sqrt {c-c \sin (e+f x)}}\right )}{f} \\ & = \frac {8 \sqrt {2} a^3 \text {arctanh}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{\sqrt {c} f}-\frac {2 a^3 c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac {4 a^3 c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac {8 a^3 \cos (e+f x)}{f \sqrt {c-c \sin (e+f x)}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 0.74 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.12 \[ \int \frac {(3+3 \sin (e+f x))^3}{\sqrt {c-c \sin (e+f x)}} \, dx=-\frac {9 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left ((480+480 i) \sqrt [4]{-1} \arctan \left (\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt [4]{-1} \left (1+\tan \left (\frac {1}{4} (e+f x)\right )\right )\right )+330 \cos \left (\frac {1}{2} (e+f x)\right )-35 \cos \left (\frac {3}{2} (e+f x)\right )-3 \cos \left (\frac {5}{2} (e+f x)\right )+330 \sin \left (\frac {1}{2} (e+f x)\right )+35 \sin \left (\frac {3}{2} (e+f x)\right )-3 \sin \left (\frac {5}{2} (e+f x)\right )\right )}{10 f \sqrt {c-c \sin (e+f x)}} \]
[In]
[Out]
Time = 2.41 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.94
method | result | size |
default | \(\frac {2 \left (\sin \left (f x +e \right )-1\right ) \sqrt {c \left (\sin \left (f x +e \right )+1\right )}\, a^{3} \left (-60 c^{\frac {5}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (\sin \left (f x +e \right )+1\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )+3 \left (c \left (\sin \left (f x +e \right )+1\right )\right )^{\frac {5}{2}}+10 c \left (c \left (\sin \left (f x +e \right )+1\right )\right )^{\frac {3}{2}}+60 \sqrt {c \left (\sin \left (f x +e \right )+1\right )}\, c^{2}\right )}{15 c^{3} \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) | \(129\) |
parts | \(-\frac {a^{3} \left (\sin \left (f x +e \right )-1\right ) \sqrt {c \left (\sin \left (f x +e \right )+1\right )}\, \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (\sin \left (f x +e \right )+1\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )}{\sqrt {c}\, \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}+\frac {a^{3} \left (\sin \left (f x +e \right )-1\right ) \sqrt {c \left (\sin \left (f x +e \right )+1\right )}\, \left (-15 c^{\frac {5}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (\sin \left (f x +e \right )+1\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )+6 \left (c \left (\sin \left (f x +e \right )+1\right )\right )^{\frac {5}{2}}-10 c \left (c \left (\sin \left (f x +e \right )+1\right )\right )^{\frac {3}{2}}+30 \sqrt {c \left (\sin \left (f x +e \right )+1\right )}\, c^{2}\right )}{15 c^{3} \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}-\frac {3 a^{3} \left (\sin \left (f x +e \right )-1\right ) \sqrt {c \left (\sin \left (f x +e \right )+1\right )}\, \left (\sqrt {c}\, \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (\sin \left (f x +e \right )+1\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )-2 \sqrt {c \left (\sin \left (f x +e \right )+1\right )}\right )}{c \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}-\frac {a^{3} \left (\sin \left (f x +e \right )-1\right ) \sqrt {c \left (\sin \left (f x +e \right )+1\right )}\, \left (3 c^{\frac {3}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (\sin \left (f x +e \right )+1\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )-2 \left (c \left (\sin \left (f x +e \right )+1\right )\right )^{\frac {3}{2}}\right )}{c^{2} \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) | \(397\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 265 vs. \(2 (132) = 264\).
Time = 0.29 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.93 \[ \int \frac {(3+3 \sin (e+f x))^3}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {2 \, {\left (\frac {30 \, \sqrt {2} {\left (a^{3} c \cos \left (f x + e\right ) - a^{3} c \sin \left (f x + e\right ) + a^{3} c\right )} \log \left (-\frac {\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) - 2\right )} \sin \left (f x + e\right ) + \frac {2 \, \sqrt {2} \sqrt {-c \sin \left (f x + e\right ) + c} {\left (\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right )}}{\sqrt {c}} + 3 \, \cos \left (f x + e\right ) + 2}{\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right )}{\sqrt {c}} + {\left (3 \, a^{3} \cos \left (f x + e\right )^{3} + 19 \, a^{3} \cos \left (f x + e\right )^{2} - 76 \, a^{3} \cos \left (f x + e\right ) - 92 \, a^{3} + {\left (3 \, a^{3} \cos \left (f x + e\right )^{2} - 16 \, a^{3} \cos \left (f x + e\right ) - 92 \, a^{3}\right )} \sin \left (f x + e\right )\right )} \sqrt {-c \sin \left (f x + e\right ) + c}\right )}}{15 \, {\left (c f \cos \left (f x + e\right ) - c f \sin \left (f x + e\right ) + c f\right )}} \]
[In]
[Out]
\[ \int \frac {(3+3 \sin (e+f x))^3}{\sqrt {c-c \sin (e+f x)}} \, dx=a^{3} \left (\int \frac {3 \sin {\left (e + f x \right )}}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx + \int \frac {3 \sin ^{2}{\left (e + f x \right )}}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx + \int \frac {\sin ^{3}{\left (e + f x \right )}}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx + \int \frac {1}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx\right ) \]
[In]
[Out]
\[ \int \frac {(3+3 \sin (e+f x))^3}{\sqrt {c-c \sin (e+f x)}} \, dx=\int { \frac {{\left (a \sin \left (f x + e\right ) + a\right )}^{3}}{\sqrt {-c \sin \left (f x + e\right ) + c}} \,d x } \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 290 vs. \(2 (132) = 264\).
Time = 0.33 (sec) , antiderivative size = 290, normalized size of antiderivative = 2.12 \[ \int \frac {(3+3 \sin (e+f x))^3}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {4 \, {\left (\frac {15 \, \sqrt {2} a^{3} \log \left (-\frac {\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1}\right )}{\sqrt {c} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {4 \, \sqrt {2} {\left (23 \, a^{3} \sqrt {c} - \frac {70 \, a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1} + \frac {140 \, a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{2}}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{2}} - \frac {90 \, a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{3}}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3}} + \frac {45 \, a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{4}}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{4}}\right )}}{c {\left (\frac {\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1} - 1\right )}^{5} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}\right )}}{15 \, f} \]
[In]
[Out]
Timed out. \[ \int \frac {(3+3 \sin (e+f x))^3}{\sqrt {c-c \sin (e+f x)}} \, dx=\int \frac {{\left (a+a\,\sin \left (e+f\,x\right )\right )}^3}{\sqrt {c-c\,\sin \left (e+f\,x\right )}} \,d x \]
[In]
[Out]